/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package nodeLevelMetaModel.impl;

import nodeLevelMetaModel.MemberRole;
import nodeLevelMetaModel.NodeLevelMetaModelPackage;
import nodeLevelMetaModel.SamplingTask;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Sampling Task</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link nodeLevelMetaModel.impl.SamplingTaskImpl#getDataType <em>Data Type</em>}</li>
 *   <li>{@link nodeLevelMetaModel.impl.SamplingTaskImpl#getSamplingCondition <em>Sampling Condition</em>}</li>
 *   <li>{@link nodeLevelMetaModel.impl.SamplingTaskImpl#getName17 <em>Name17</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class SamplingTaskImpl extends EObjectImpl implements SamplingTask {
	/**
	 * The default value of the '{@link #getDataType() <em>Data Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDataType()
	 * @generated
	 * @ordered
	 */
	protected static final String DATA_TYPE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getDataType() <em>Data Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDataType()
	 * @generated
	 * @ordered
	 */
	protected String dataType = DATA_TYPE_EDEFAULT;

	/**
	 * The default value of the '{@link #getSamplingCondition() <em>Sampling Condition</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSamplingCondition()
	 * @generated
	 * @ordered
	 */
	protected static final String SAMPLING_CONDITION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getSamplingCondition() <em>Sampling Condition</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSamplingCondition()
	 * @generated
	 * @ordered
	 */
	protected String samplingCondition = SAMPLING_CONDITION_EDEFAULT;

	/**
	 * The cached value of the '{@link #getName17() <em>Name17</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName17()
	 * @generated
	 * @ordered
	 */
	protected MemberRole name17;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected SamplingTaskImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return NodeLevelMetaModelPackage.Literals.SAMPLING_TASK;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getDataType() {
		return dataType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setDataType(String newDataType) {
		String oldDataType = dataType;
		dataType = newDataType;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SAMPLING_TASK__DATA_TYPE, oldDataType, dataType));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getSamplingCondition() {
		return samplingCondition;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSamplingCondition(String newSamplingCondition) {
		String oldSamplingCondition = samplingCondition;
		samplingCondition = newSamplingCondition;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SAMPLING_TASK__SAMPLING_CONDITION, oldSamplingCondition, samplingCondition));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MemberRole getName17() {
		if (name17 != null && name17.eIsProxy()) {
			InternalEObject oldName17 = (InternalEObject)name17;
			name17 = (MemberRole)eResolveProxy(oldName17);
			if (name17 != oldName17) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, NodeLevelMetaModelPackage.SAMPLING_TASK__NAME17, oldName17, name17));
			}
		}
		return name17;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MemberRole basicGetName17() {
		return name17;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setName17(MemberRole newName17) {
		MemberRole oldName17 = name17;
		name17 = newName17;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, NodeLevelMetaModelPackage.SAMPLING_TASK__NAME17, oldName17, name17));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case NodeLevelMetaModelPackage.SAMPLING_TASK__DATA_TYPE:
				return getDataType();
			case NodeLevelMetaModelPackage.SAMPLING_TASK__SAMPLING_CONDITION:
				return getSamplingCondition();
			case NodeLevelMetaModelPackage.SAMPLING_TASK__NAME17:
				if (resolve) return getName17();
				return basicGetName17();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case NodeLevelMetaModelPackage.SAMPLING_TASK__DATA_TYPE:
				setDataType((String)newValue);
				return;
			case NodeLevelMetaModelPackage.SAMPLING_TASK__SAMPLING_CONDITION:
				setSamplingCondition((String)newValue);
				return;
			case NodeLevelMetaModelPackage.SAMPLING_TASK__NAME17:
				setName17((MemberRole)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case NodeLevelMetaModelPackage.SAMPLING_TASK__DATA_TYPE:
				setDataType(DATA_TYPE_EDEFAULT);
				return;
			case NodeLevelMetaModelPackage.SAMPLING_TASK__SAMPLING_CONDITION:
				setSamplingCondition(SAMPLING_CONDITION_EDEFAULT);
				return;
			case NodeLevelMetaModelPackage.SAMPLING_TASK__NAME17:
				setName17((MemberRole)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case NodeLevelMetaModelPackage.SAMPLING_TASK__DATA_TYPE:
				return DATA_TYPE_EDEFAULT == null ? dataType != null : !DATA_TYPE_EDEFAULT.equals(dataType);
			case NodeLevelMetaModelPackage.SAMPLING_TASK__SAMPLING_CONDITION:
				return SAMPLING_CONDITION_EDEFAULT == null ? samplingCondition != null : !SAMPLING_CONDITION_EDEFAULT.equals(samplingCondition);
			case NodeLevelMetaModelPackage.SAMPLING_TASK__NAME17:
				return name17 != null;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (dataType: ");
		result.append(dataType);
		result.append(", samplingCondition: ");
		result.append(samplingCondition);
		result.append(')');
		return result.toString();
	}

} //SamplingTaskImpl
